package com.servicesManagement.model;
// Generated Dec 13, 2014 11:53:18 AM by Hibernate Tools 3.2.1.GA


import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.codehaus.jackson.annotate.JsonIgnore;

/**
 * AspectListGroup generated by hbm2java
 */
@Entity
@Table(name="ASPECT_LIST_GROUP"
    ,schema="SANKAR"
)
public class AspectListGroup  implements java.io.Serializable {


     private BigDecimal aspectListGroupId;
    // private List<AspectList> aspectList = new ArrayList<AspectList>();
     private DependencyType dependencyType;
     @JsonIgnore
     private AspectConf aspectConf;
     private BigDecimal changedByUserId;
     private Date changedDate;
     private BigDecimal createdByUserId;
     private Date createdDate;
     private Date effectiveDate;
     private Date expirationDate;
     
     private List<AspectListGroupConf> aspectListGroupConfs = new ArrayList<AspectListGroupConf>();

    public AspectListGroup() {
    }

	
    public AspectListGroup(BigDecimal aspectListGroupId) {
        this.aspectListGroupId = aspectListGroupId;
    }
    public AspectListGroup(BigDecimal aspectListGroupId, AspectList aspectList, DependencyType dependencyType, AspectConf aspectConf, BigDecimal changedByUserId, Date changedDate, BigDecimal createdByUserId, Date createdDate, Date effectiveDate, Date expirationDate, Set aspectListGroupConfs) {
       this.aspectListGroupId = aspectListGroupId;
      // this.aspectList = aspectList;
       //this.dependencyType = dependencyType;
       this.aspectConf = aspectConf;
       this.changedByUserId = changedByUserId;
       this.changedDate = changedDate;
       this.createdByUserId = createdByUserId;
       this.createdDate = createdDate;
       this.effectiveDate = effectiveDate;
       this.expirationDate = expirationDate;
       //this.aspectListGroupConfs = aspectListGroupConfs;
    }
   
     @Id 
    
    @Column(name="ASPECT_LIST_GROUP_ID", unique=true, nullable=false, scale=0)
    public BigDecimal getAspectListGroupId() {
        return this.aspectListGroupId;
    }
    
    public void setAspectListGroupId(BigDecimal aspectListGroupId) {
        this.aspectListGroupId = aspectListGroupId;
    }

    
    
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="DEPENDENCY_TYPE_ID")
    public DependencyType getDependencyType() {
        return this.dependencyType;
    }
    
    public void setDependencyType(DependencyType dependencyType) {
        this.dependencyType = dependencyType;
    }
    
    @OneToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ASPECT_CONF_ID")
    public AspectConf getAspectConf() {
        return this.aspectConf;
    }
    
    public void setAspectConf(AspectConf aspectConf) {
        this.aspectConf = aspectConf;
    }
    
    @Column(name="CHANGED_BY_USER_ID")
    public BigDecimal getChangedByUserId() {
        return this.changedByUserId;
    }
    
    public void setChangedByUserId(BigDecimal changedByUserId) {
        this.changedByUserId = changedByUserId;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="CHANGED_DATE", length=7)
    public Date getChangedDate() {
        return this.changedDate;
    }
    
    public void setChangedDate(Date changedDate) {
        this.changedDate = changedDate;
    }
    
    @Column(name="CREATED_BY_USER_ID")
    public BigDecimal getCreatedByUserId() {
        return this.createdByUserId;
    }
    
    public void setCreatedByUserId(BigDecimal createdByUserId) {
        this.createdByUserId = createdByUserId;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="CREATED_DATE", length=7)
    public Date getCreatedDate() {
        return this.createdDate;
    }
    
    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="EFFECTIVE_DATE", length=7)
    public Date getEffectiveDate() {
        return this.effectiveDate;
    }
    
    public void setEffectiveDate(Date effectiveDate) {
        this.effectiveDate = effectiveDate;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="EXPIRATION_DATE", length=7)
    public Date getExpirationDate() {
        return this.expirationDate;
    }
    
    public void setExpirationDate(Date expirationDate) {
        this.expirationDate = expirationDate;
    }
    
    
    @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="id.aspectListGroup")
    public List<AspectListGroupConf> getAspectListGroupConfs() {
        return this.aspectListGroupConfs;
    }
    
    public void setAspectListGroupConfs(List<AspectListGroupConf> aspectListGroupConfs) {
        this.aspectListGroupConfs = aspectListGroupConfs;
    }

    @Override
    public String toString() {
        return "AspectListGroup{" + "aspectListGroupId=" + aspectListGroupId + ", dependencyType=" + dependencyType + ", changedByUserId=" + changedByUserId + ", changedDate=" + changedDate + ", createdByUserId=" + createdByUserId + ", createdDate=" + createdDate + ", effectiveDate=" + effectiveDate + ", expirationDate=" + expirationDate + ", aspectListGroupConfs=" + aspectListGroupConfs + '}';
    }




}


